#include <sysregs.h>
#include <vm_mmu.h>

#define GOS_VS_MEM 0x80000000

/* if config virt EL1 vector = vector */
extern char vectors[];

void vm_main(unsigned long gpa_addr){

    unsigned long gva_addr;

    printk(" enter vm --------- 1");
    
    write_sysreg(vectors, vbar_el1);

    /*identity from text_boot to 512M */
    gos_paging_init();

    gva_addr = GOS_VS_MEM;

    /* unidentical */
    gos_mapping(gva_addr, gpa_addr);

	printk("gva_ddr 0x%lx value 0x%lx\n", gva_addr, *(unsigned long *)gva_addr);
    while (1);
}